/*
 * @Description:
 * @Author: yyh
 * @Date: 2022-03-06 17:25:44
 * @LastEditors: yyh
 * @LastEditTime: 2022-04-09 01:56:07
 */
var multer = require("multer");
var express = require("express");
var router = express.Router();
var users = require("../controllers/userController");
var upload = multer({ dest: "./public/uploads/" }).single("file");

/* GET users listing. */
//新增用户信息接口
router.post("/addUserInfo", users.addUserInfo);
//删除资产使用接口
router.get("/deleteUserInfo",users.deleteUserInfo);
// 修改用户信息接口
router.post("/updateUserInfo", users.updateUserInfo);
//模糊查询、获取用户信息接口
router.get("/getUsersInfo",users.getUsersInfo);
// 登录接口
router.post("/login", users.login);
//通过id查询用户信息接口
router.get("/getUserInfoById",users.getUserInfoById);
// 修改用户头像接口
router.post("/uploadUserImg", upload, users.uploadUserImg);

module.exports = router;
